package com.xt.bean;

import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Arrays;

@Document(collection = "tb_user")
public class User extends BaseBean {

    private String schoolNumber;//工号，学号。作为登陆账户
    private String pwd;//用户密码
    private String name;//用户姓名
    private String signature;//个性签名
    private String birthday;//生日
    private String email;//邮箱
    private String homeAddress;//家庭住址
    private String icon;//头像
    private Long phone;//电话号码
    private String intro;//简介
    private String entranceYear;//入校年
    private Integer readNum;//阅读量
    private String wechat;//微信
    private String qq;//微信
    private Integer roleType;//0:学生，1：教师，2：管理员，3：超级管理员

    private String departmentId;//所属院系id 教师和学生都有
    private String departmentName;//所属院系名称

    private String recordFilePath;

    /**
     * 关联关系
     */
    private String[] rolesId;//角色id数组

    /**
     * 教师
     */
    private Integer releaseNum;//发布文章数目
    private String duty;//教师职称

    /**
     * 学生
     */
    private String classId;//关联的班级id
    private String className;//关联的班级名称
    private String specialtyId;//关联的专业id
    private String specialtyName;//关联的专业名称

    public String getRecordFilePath() {
        return recordFilePath;
    }

    public void setRecordFilePath(String recordFilePath) {
        this.recordFilePath = recordFilePath;
    }

    public String getSchoolNumber() {
        return schoolNumber;
    }

    public void setSchoolNumber(String schoolNumber) {
        this.schoolNumber = schoolNumber;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getHomeAddress() {
        return homeAddress;
    }

    public void setHomeAddress(String homeAddress) {
        this.homeAddress = homeAddress;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Long getPhone() {
        return phone;
    }

    public void setPhone(Long phone) {
        this.phone = phone;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getEntranceYear() {
        return entranceYear;
    }

    public void setEntranceYear(String entranceYear) {
        this.entranceYear = entranceYear;
    }

    public Integer getRoleType() {
        return roleType;
    }

    public void setRoleType(Integer roleType) {
        this.roleType = roleType;
    }

    public Integer getReadNum() {
        return readNum;
    }

    public void setReadNum(Integer readNum) {
        this.readNum = readNum;
    }

    public String[] getRolesId() {
        return rolesId;
    }

    public void setRolesId(String[] rolesId) {
        this.rolesId = rolesId;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public Integer getReleaseNum() {
        return releaseNum;
    }

    public void setReleaseNum(Integer releaseNum) {
        this.releaseNum = releaseNum;
    }

    public String getClassId() {
        return classId;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getDuty() {
        return duty;
    }

    public void setDuty(String duty) {
        this.duty = duty;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getSpecialtyId() {
        return specialtyId;
    }

    public void setSpecialtyId(String specialtyId) {
        this.specialtyId = specialtyId;
    }

    public String getSpecialtyName() {
        return specialtyName;
    }

    public void setSpecialtyName(String specialtyName) {
        this.specialtyName = specialtyName;
    }

    @Override
    public String toString() {
        return "User{" +
                "schoolNumber='" + schoolNumber + '\'' +
                ", pwd='" + pwd + '\'' +
                ", name='" + name + '\'' +
                ", signature='" + signature + '\'' +
                ", birthday='" + birthday + '\'' +
                ", email='" + email + '\'' +
                ", homeAddress='" + homeAddress + '\'' +
                ", icon='" + icon + '\'' +
                ", phone=" + phone +
                ", intro='" + intro + '\'' +
                ", entranceYear='" + entranceYear + '\'' +
                ", readNum=" + readNum +
                ", wechat='" + wechat + '\'' +
                ", qq='" + qq + '\'' +
                ", departmentId='" + departmentId + '\'' +
                ", rolesId=" + Arrays.toString(rolesId) +
                ", releaseNum=" + releaseNum +
                ", duty='" + duty + '\'' +
                ", classId='" + classId + '\'' +
                '}';
    }
}